﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace HZ.Supervise.Web.PageControl
{
    public partial class ComparisonLeft :BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            if (!IsPostBack)
            {

                //add by 曹鹏 2011年5月7日15:42:29 取得当前用户

                lblCurrentUser.Text = HZ.Supervise.Web.Function.GetNowTime() + "&nbsp;&nbsp;<img alt='' src='../Images/ModalImageAh_New/smile.gif'/>&nbsp;&nbsp;" + CurrentAccount.GetUser().UserName;
                
                //取得当前用户角色
                this.lblCurrentRole.Text = CurrentAccount.GetUser().Org.OrgName;


            }

            //日期默认一个月
            //张雄 create 2011.4.26
            //DateTime dt = DateTime.Now;
            //this.txtTimeTo.Text = dt.Year+ "-" + dt.Month + "-" + dt.Day;

            //this.txtTimeFrom.Text = dt.Year + "-" + (Convert.ToInt32( dt.Month) - 1) + "-" + dt.Day;
        }

		protected void Run_Click(object sender, EventArgs e)
		{

		}

        /// <summary>
        /// 点击对比
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        //protected void Button2_Click(object sender, EventArgs e)
        //{
        //    if (string.IsNullOrEmpty(this.txtTimeFrom.Text))
        //    {
        //        this.Page.ClientScript.RegisterStartupScript(Page.GetType(), "", "<script>alert('请选择对比起始时间');</script>");

        //        return;
        //    }
        //    if (string.IsNullOrEmpty(this.txtTimeTo.Text))
        //    {
        //        this.Page.RegisterStartupScript("", "<script>alert('请选择对比结束时间'),check();</script>");
        //        return;
        //    }
        //    string where = "";
        //    string timefrom = this.txtTimeFrom.Text;
        //    string timeto = this.txtTimeTo.Text;
        //    string sid = "";
        //    switch (this.RadioButtonList1.SelectedValue.ToString())
        //    {
        //        case "1":
        //            where = this.HidHosId.Value;
        //            // sid = this.droSort.SelectedValue.ToString();xml
        //            if (string.IsNullOrEmpty(where))
        //            {
        //                this.Page.RegisterStartupScript("", "<script>alert('请选择对比医院'),check();</script>");
        //                return;
        //            }
        //            else if (where.Split(',').Length < 3)
        //            {
        //                this.Page.RegisterStartupScript("", "<script>alert('请选择最少两家医院进行对比'),check();</script>");
        //                return;
        //            }
        //            else
        //            {
        //                this.Page.RegisterStartupScript("", "<script>seturl1('" + where + "','" + timefrom + "','" + timeto + "','" + sid + "'),check();</script>");
        //            }
        //            break;
        //        case "2":
        //            // sid = this.droSort.SelectedValue.ToString(); xml
        //            where = this.HidAreaId.Value;
        //            if (string.IsNullOrEmpty(where))
        //            {
        //                this.Page.RegisterStartupScript("", "<script>alert('请选择对比地区'),check();</script>");
        //                return;
        //            }
        //            else if (where.Split(',').Length < 3)
        //            {
        //                this.Page.RegisterStartupScript("", "<script>alert('请选择最少两个区域进行对比'),check();</script>");
        //                return;
        //            }
        //            else
        //            {
        //                this.Page.RegisterStartupScript("", "<script>seturl2('" + where + "','" + timefrom + "','" + timeto + "','" + sid + "'),check();</script>");
        //            }

        //            break;
        //        case "3":
        //            //   sid = this.droSort.SelectedValue.ToString();xml
        //            where = this.HidProId.Value;
        //            if (string.IsNullOrEmpty(where))
        //            {
        //                this.Page.RegisterStartupScript("", "<script>alert('请选择对比药品'),check();</script>");
        //                return;
        //            }
        //            else if (where.Split(',').Length < 3)
        //            {
        //                this.Page.RegisterStartupScript("", "<script>alert('请选择最少两个区域进行药品'),check();</script>");
        //                return;
        //            }
        //            else
        //            {
        //                this.Page.RegisterStartupScript("", "<script>seturl4('" + where + "','" + timefrom + "','" + timeto + "','" + sid + "'),check();</script>");
        //            }
        //            break;
        //        default:
        //            // sid = this.HidSortId.Value;  xml
        //            sid = this.HidHosId.Value;
        //            this.Page.RegisterStartupScript("", "<script>seturl1('" + where + "','" + timefrom + "','" + timeto + "','" + sid + "'),check();</script>");
        //            break;
        //    }
        //}
    }
}
